package com.dys.test12;

/**
 * @className: com.dys.test12.Test
 * @description: com.dys.test12
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/08/19 下午10:02
 */
public class Test {
    /**
     * 这是一个main()方法,是应用程序的入口
     *
     * @param args 方法的形参列表,是一个字符串数组,包含了从命令行传递给程序的参数
     */
    public static void main(String[] args) {
        // SynchronizedMethod sm = new SynchronizedMethod();
        // Thread t1 = new Thread(sm, "窗口1");
        // t1.start();
        // Thread t2 = new Thread(sm, "窗口2");
        // t2.start();
        // Thread t3 = new Thread(sm, "窗口3");
        // t3.start();

        // 方式2
        BuyTicketThread t1 = new BuyTicketThread("窗口1");
        t1.start();
        BuyTicketThread t2 = new BuyTicketThread("窗口2");
        t2.start();
        BuyTicketThread t3 = new BuyTicketThread("窗口3");
        t3.start();
    }
}
